Preparing examination question papers is a repetitive and time-consuming task for faculty members. The conventional process requires faculty to review educational materials, identify important concepts, formulate questions, determine suitable difficulty levels, and arrange questions according to examination requirements. Smart Q Gen is an AI-assisted web-based question paper generation system designed to reduce this manual effort by generating questions from faculty-provided educational documents. The system accepts PDF, DOCX, and TXT files and performs text extraction, cleaning, structure detection, and text chunking. A hybrid information retrieval approach combines BM25 keyword retrieval and FAISS semantic retrieval using Sentence Transformer embeddings. Reciprocal Rank Fusion (RRF) is applied to combine the rankings produced by the two retrieval methods. The retrieved context is supplied to the FLAN-T5-Small model together with parameters such as question type, number of questions, difficulty level, and Bloom’s Taxonomy level. Generated questions undergo validation and duplicate checking before being organized into a structured question paper. The system also provides faculty authentication, question preview, PDF export using ReportLab, and MongoDB Atlas-based storage. The proposed system integrates document processing, hybrid retrieval, AI-based question generation, validation, and paper generation into a single faculty-assisted workflow.
Introduction
Smart Q Gen is an AI-based question paper generation system designed to help faculty members create question papers quickly and efficiently from educational documents. Traditional question paper preparation requires teachers to review textbooks, notes, and presentations, select important topics, prepare questions of different types and difficulty levels, and check for repetition. Smart Q Gen automates many of these tasks while allowing teachers to review and approve the final questions.
The system uses Retrieval-Augmented Generation (RAG) to ensure that generated questions are based on the uploaded study material. It accepts PDF, DOCX, and TXT files, extracts and cleans the text, identifies document sections, and divides the content into smaller chunks for efficient searching.
For information retrieval, the system combines BM25 keyword-based retrieval with FAISS semantic retrieval, using the all-MiniLM-L6-v2 Sentence Transformer model to identify relevant content. Reciprocal Rank Fusion (RRF) combines the results from both retrieval methods to improve the ranking of relevant passages. The retrieved content is then provided to the FLAN-T5-Small language model, which generates questions according to the selected question type, number of questions, difficulty level, and Bloom’s Taxonomy level.
The generated questions undergo validation and duplicate checking before being organized into a structured question paper. The system also supports PDF question paper generation, making the output convenient for academic use.
The literature review covers traditional rule-based methods, neural question generation, transformer models, retrieval-augmented generation, semantic search, and difficulty-controlled question generation. It identifies the need for an integrated system that combines document processing, hybrid retrieval, question generation, validation, and question paper formatting in one workflow.
Conclusion
Smart Q Gen provides an AI-assisted approach for reducing the manual effort involved in examination question-paper preparation. The system accepts PDF, DOCX, and TXT educational documents and processes them through text extraction, cleaning, structure detection, and chunking. Relevant information is retrieved using a combination of BM25 keyword retrieval and FAISS semantic retrieval, while Reciprocal Rank Fusion combines the resulting rankings. The selected context is supplied to FLAN-T5-Small together with the required question type, number of questions, difficulty level, and Bloom’s Taxonomy level.
Generated questions are validated and checked for duplication before being assembled into a structured question paper. The system provides question preview and PDF export using ReportLab, while MongoDB Atlas stores faculty information, document metadata, and generated-paper records. The primary contribution of Smart Q Gen is the practical integration of established document-processing, hybrid-retrieval, and language-generation techniques into a document-grounded faculty-assisted workflow. The system is designed to assist faculty members rather than completely replace human academic judgment. Completing the quantitative evaluation with measured retrieval, question-quality, and timing results is the immediate next step of this work.
References
[1] A. Vaswani et al., “Attention Is All You Need,” Advances in Neural Information Processing Systems, 2017.
[2] C. Raffel et al., “Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer,” Journal of Machine Learning Research, vol. 21, no. 140, pp. 1–67, 2020.
[3] G. Kurdi, J. Leo, B. Parsia, U. Sattler, and S. Al-Emari, “A systematic review of automatic question generation for educational purposes,” International Journal of Artificial Intelligence in Education, vol. 30, pp. 121–204, 2020.
[4] H. W. Chung et al., “Scaling Instruction-Finetuned Language Models,” arXiv preprint arXiv:2210.11416, 2022.
[5] S. Robertson and H. Zaragoza, “The Probabilistic Relevance Framework: BM25 and Beyond,” Foundations and Trends in Information Retrieval, vol. 3, no. 4, pp. 333–389, 2009.
[6] V. Karpukhin et al., “Dense Passage Retrieval for Open-Domain Question Answering,” in Proc. EMNLP, 2020.
[7] M. Heilman and N. A. Smith, “Good Question! Statistical Ranking for Question Generation,” in Proc. NAACL-HLT, 2010.
[8] X. Du, J. Shao, and C. Cardie, “Learning to Ask: Neural Question Generation for Reading Comprehension,” in Proc. ACL, 2017.
[9] P. Lewis et al., “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks,” in Advances in Neural Information Processing Systems, vol. 33, 2020.
[10] N. Reimers and I. Gurevych, “Sentence-BERT: Sentence Embeddings Using Siamese BERT-Networks,” in Proc. EMNLP-IJCNLP, 2019.
[11] J. Johnson, M. Douze, and H. Jégou, “Billion-Scale Similarity Search with GPUs,” IEEE Transactions on Big Data, vol. 7, no. 3, 2021.
[12] G. V. Cormack, C. L. A. Clarke, and S. Buettcher, “Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods,” in Proc. SIGIR, 2009.
[13] B. S. Bloom et al., Taxonomy of Educational Objectives: The Classification of Educational Goals, 1956.
[14] Y. Tomikawa, A. Suzuki, and M. Uto, “Adaptive Question–Answer Generation With Difficulty Control Using Item Response Theory and Pretrained Transformer Models,” IEEE Transactions on Learning Technologies, vol. 17, pp. 2186–2198, 2024.
[15] P.-C. Huang, Y.-H. Chan, C.-Y. Yang, H.-Y. Chen, and Y.-C. Fan, “EQGG: Automatic Question Group Generation,” IEEE Transactions on Learning Technologies, vol. 17, pp. 1994–2007, 2024.
[16] Y. Tomikawa and M. Uto, “Difficulty-Controllable Multiple-Choice Question Generation Using Large Language Models and Direct Preference Optimization,” IEEE Access, vol. 14, pp. 44698–44706, 2026.
[17] R. Mitkov and L. A. Ha, “Computer-Aided Generation of Multiple-Choice Tests,” in Proc. HLT-NAACL Workshop on Building Educational Applications Using NLP, 2003, pp. 17–22.